<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>发布文档- ${site.name} - Powered by JEECMS</title>
<link href="${resSys}/front.css" rel="stylesheet" type="text/css"/>
<script src="${resSys}/jquery.js" type="text/javascript"></script>
<script src="${resSys}/front.js" type="text/javascript"></script>
<script src="${base}/thirdparty/ckeditor/ckeditor.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="../../${res}/css/member.css" />
<script type="text/javascript">
$.validator.methods.leafChannel = function(value, element, param) {
	var i = element.selectedIndex;
	return $(element.options[i]).attr("class")!="sel-disabled";
}
$(function() {
	$("#jvForm").validate({
		rules: {
			channelId: {
				required: true,
				leafChannel: true
			}
		},
		messages:{
			channelId: {
				leafChannel: "请选择末级栏目"
			}
		}
	});
});
</script>
<style type="text/css">
.sel-disabled{background-color:#ccc}
</style>
</head>
<body>
[#include "member_header.html"/]
<div class="container">
	 [#include "member_navi.html"/]
    <div class="mc_right">
        [#include "member_top.html"/]
        <div class="mr-top-position">
		     <div class="mr-top-tit fl">发布文档</div>
		    <div class="modify fr"><a href="${base}/member/doc_list.jspx?modelId=9">文档列表</a></div>
		 </div>
        <div class="mc_content">   
         	[#include "doc_upload.html"/]
            <form id="jvForm" action="doc_save.jspx" method="post">
             <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#C8DCF0" style="margin:5px;">
               <tr>
                 <td width="86" height="25" align="right" bgcolor="#f6fbff">上传文档：</td>
                 <td width="626" bgcolor="#FFFFFF">
                 	<table id="attachTable" border="0">
					[#list 0..0 as i]
					<tr id="attachTr${i}">
						<td align="center"><input type="text" id="docNames${i}" name="docName" required="true" class="required"/></td>
						<td align="center"><input type="text" id="docPaths${i}" name="docPath" required="true" class="required"/></td>
						<td align="center">
							<span id="afc${i}" style="position:relative;display:block;width:300px;*width:300px;">
							<input type='text' id='docText${i}'/>  
							<input class="member_button" type='button' value='浏览'/>
							<input onchange="$('#docText${i}').val(this.value)" size="19" type="file" name="doc" id="docFile${i}" style="height:24px;opacity:0;filter:alpha(opacity=0);position:absolute;right:69px;top:2px;"/>
							<input type="button" value="上传" onclick="uploadDoc(${i});" class="member_button"/>
							</span>
							<input type="hidden" id="docFilenames${i}" name="docFilename"/>
							<input type="hidden" id="fileSuffix" name="fileSuffix"/>
						</td>
					</tr>
					</table>
					[/#list]
                 </td>
               </tr>
               <tr>
                 <td height="25" align="right" bgcolor="#f6fbff">标题</td>
                 <td bgcolor="#FFFFFF">
                 <input type="text" name="title" maxlength="255" required="true" class="required"/> </td>
               </tr>
               <tr>
                 <td height="25" align="right" bgcolor="#f6fbff">财富值</td>
                 <td bgcolor="#FFFFFF"><input type="text" name="downNeed" maxlength="10" required="true" class="required digits"/></td>
               </tr>
               <tr>
                 <td height="25" align="right" bgcolor="#f6fbff">是否开放</td>
                 <td bgcolor="#FFFFFF">
                 	<input name="isOpen" type="radio" value="true" checked="checked"/>开放
                 	<input name="isOpen" type="radio" value="false"/>私有
                 </td>
               </tr>
               <tr>
                 <td height="25" align="right" bgcolor="#f6fbff">栏目：</td>
                 <td bgcolor="#FFFFFF">
                 <select name="channelId">
                    <option value="" class="sel-disabled">--请选择--</option>
	                [#if channelList?size gt 0]
	                [#assign origDeep=channelList[0].deep+1/]
	                [#list channelList as c]
	                    <option value="${c.id}"[#if c.child?size gt 0] class="sel-disabled"[/#if]>[#if c.deep gte origDeep][#list origDeep..c.deep as i]&nbsp;&nbsp;[/#list]>[/#if]${c.name}</option>
	                [/#list]
	                [/#if]
                </select>
                 </td>
               </tr>
               <tr>
                 <td height="25" align="right" bgcolor="#f6fbff">简介：</td>
                 <td bgcolor="#FFFFFF"><textarea name="description" rows="3" cols="70" maxlength="255"/></textarea></td>
               </tr> 
                <tr>
                      <td width="13%" height="30" align="right" bgcolor="#fafafa">验证码：</td>
                      <td bgcolor="#FFFFFF">
                     <input type="text" name="captcha" maxlength="20" class="required"/> 
                       </td>
               </tr>
               <tr>
                      <td width="13%" align="right" bgcolor="#fafafa"></td>
                      <td bgcolor="#FFFFFF">
                     <img id="guestbookCaptcha" src="${base}/captcha.svl" onclick="this.src='${base}/captcha.svl?d='+new Date()"/>
                       </td>
               </tr>
               <tr>
                 <td height="25" colspan="2" align="center" bgcolor="#FFFFFF">
                 <input type="hidden" name="nextUrl" value="doc_list.jspx"/>
                  <input type="hidden" name="modelId" value="9"/>
                 <input type="submit" value="提交" class="member_button"/> <input type="reset" value="重置" class="member_button"/>
                 </td>
                 </tr>
             </table>
             </form>
    	</div>
  </div>
     <div style="clear:both"></div>
</div>
</body>
</html>
